package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.PubCompanyMapper;
import com.ruoyi.bussiness.domain.PubCompany;
import com.ruoyi.bussiness.service.IPubCompanyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 企业Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class PubCompanyServiceImpl implements IPubCompanyService 
{
    @Autowired
    private PubCompanyMapper pubCompanyMapper;

    /**
     * 查询企业
     * 
     * @param id 企业主键
     * @return 企业
     */
    @Override
    public PubCompany selectPubCompanyById(Long id)
    {
        return pubCompanyMapper.selectPubCompanyById(id);
    }

    /**
     * 查询企业列表
     * 
     * @param pubCompany 企业
     * @return 企业
     */
    @Override
    public List<PubCompany> selectPubCompanyList(PubCompany pubCompany)
    {
        return pubCompanyMapper.selectPubCompanyList(pubCompany);
    }

    /**
     * 新增企业
     * 
     * @param pubCompany 企业
     * @return 结果
     */
    @Override
    public int insertPubCompany(PubCompany pubCompany)
    {
        return pubCompanyMapper.insertPubCompany(pubCompany);
    }

    /**
     * 修改企业
     * 
     * @param pubCompany 企业
     * @return 结果
     */
    @Override
    public int updatePubCompany(PubCompany pubCompany)
    {
        return pubCompanyMapper.updatePubCompany(pubCompany);
    }

    /**
     * 批量删除企业
     * 
     * @param ids 需要删除的企业主键
     * @return 结果
     */
    @Override
    public int deletePubCompanyByIds(String ids)
    {
        return pubCompanyMapper.deletePubCompanyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除企业信息
     * 
     * @param id 企业主键
     * @return 结果
     */
    @Override
    public int deletePubCompanyById(Long id)
    {
        return pubCompanyMapper.deletePubCompanyById(id);
    }
}
